<?php echo $html->script(array("fckeditor.js","jquery.validate.js")); ?>
<div class="breadcrumb">
    <ul id="breadcrumb">
        <li><a href="<?php echo Configure::read('base_url');?>backstage" title="Home">
		<?php echo $this->Html->image("home.png", array("alt" => "Home",'class'=>'home','border'=>'0'));?>
		</a></li>
        <li>Contact Information</li>
    </ul>
</div>
<?php echo $this->element('admin/admin_leftmenu'); ?>
<div id="left">    
    <?php echo $this->Session->flash(); ?>
    <div class="div_header"><?php __('Contact Information'); ?></div>
    <div class="div_content">
<div class="paging">
            <?php echo $this->element('admin/cmspages/top_menu'); ?>
	</div><br/>
		<?php echo $this->Form->create('Contact');
		echo $this->Form->input('id');
		?>
		<table cellspacing="0" width="100%">
			<tbody>
				<tr>
					<td colspan="2" align="left" style="background:#ccc;font-size:15px;">Contact Information</td>
				</tr>
				<tr>
					<td colspan="2" align="left">
						<?php echo $form->textarea('Contact.address', array('cols'=>'85','rows' =>'15','class'=>'fckrequired'));?>
						<?php echo $fck->load('Contact.address', 'Custom');?>
					</td>
				</tr>
				<tr>
                <td align="left">
                 <b>Feedback / Contact Us form email is sent to <span style="color:red;">*</span> :</b>
				 <br><span>(put multiple addresses separated by comma)</span>
                </td>
                <td width="247">
                    <?php
						echo $this->Form->input('Contact.email',array('label'=>false,'div'=>false,'type'=>'text','class'=>'required','size'=>"70"));
					?>
                </td>
            </tr>
				<tr>
					<td colspan="2" align="left">
						<input type="submit" class="button" name="button" id="button" value="Save" />
					</td>
				</tr>
			</tbody>
		</table>
        </form>
   
</div>
<div class="div_bottom"></div>
</div>
</div>
   
<script type="text/javascript">
    jQuery(document).ready(function(){
    jQuery.validator.addMethod("fckrequired", function (value, element) {
        var oEditor = FCKeditorAPI.GetInstance('ContactContacts') ;
        var pageValue = oEditor.GetHTML(true);
        pageValue=jQuery.trim(pageValue);
        if ( pageValue == "<br />" || pageValue == "") {
            return false;
        }else{
            return true;
        }
    }, "This field is required.");
});
</script>